package com.kaili.pojo.dto.delivery;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;

/**
 * @author xjh
 * @ClassName EwbsDeliveryAddBean
 * @Description 新增派车接货实体类
 * @Date 下午3:27 18-5-21
 * @Version 1.0
 */
@Data
public class EwbsDeliveryAddDTO {
    @Pattern(regexp = "^[A-Za-z0-9]{0,30}$",message = "接货单号应为[A-Za-z0-9]组成的1-30位字符")
    @ApiModelProperty("接货单号")
    private String deliveryNo;

    @NotNull(message = "派车时间不得为空")
    @ApiModelProperty("派车时间")
    private Date sendCarTime;

    @NotNull(message = "车辆id不得为空")
    @ApiModelProperty("车辆id")
    private Integer carId;

    @NotNull(message = "驾驶员id不得为空")
    @ApiModelProperty("驾驶员id")
    private Integer driverId;

    @NotNull(message = "接货费总计不得为空")
    @ApiModelProperty("接货费总计")
    private Double amount;

    @NotNull(message = "接货总件数不得为空")
    @ApiModelProperty("接货总件数")
    private Integer piece;

    @NotNull(message = "接货总重量不得为空")
    @ApiModelProperty("接货总重量")
    private Double weight;

    @NotNull(message = "接货总体积不得为空")
    @ApiModelProperty("接货总体积")
    private Double vol;

    @ApiModelProperty("备注")
    private String remark;

    @Size(min=1,message = "接货单至少含有一个预约订单号")
    @ApiModelProperty("预约订单号")
    public List<String> appointNoList;

    @NotNull(message = "数据来源不得为空")
    @ApiModelProperty("来源,1标示web端,2标示PDA端")
    private Integer sourceType;
}
